package com.fp.m7.shared;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * List of validation errors.
 * 
 * @author 7
 */
public class ValidationResult extends ArrayList<ValidationError> implements Serializable {
    private static final long serialVersionUID = -835082025505848190L;

    public ValidationResult() {
    }

    public ValidationResult(ValidationError... errors) {
        for (ValidationError error : errors) {
            if (error != null) {
                add(error);
            }
        }
    }

    public boolean isOk() {
        return isEmpty();
    }
}
